﻿package gui.hug;

import flash.text.TextField;

class LinkButtonDS extends HUGSprite {
	public function new(bt : UInt, state : UInt, s : String, fs : UInt, textFormat : UInt, w : Float, h : Float) {
		super();
		textFormat |= Utils.TXT_AUTOSIZE;

		if ( state == 1)
		textFormat |= Utils.TXT_UNDERLINE;

		if ( w > 0  &&  h > 0)
		textFormat |= Utils.TXT_MULTILINE;

		var txt : TextField = Utils.addText(0, 0, w, fs, s, Utils.BUT1_TXT_COL, textFormat, h);

		//if ( w > 0  &&  h == 0  &&  txt.textWidth > w)
		//{
		//  textFormat |= Utils.TXT_MULTILINE;
		//  txt = Utils.addText(0, 0, w, fs, s, Utils.BUT1_TXT_COL, tf, h);
		//}

		addChild(txt);
	}
}

